import time

from tqdm import tqdm

training_bar = tqdm(total=400, dynamic_ncols=True)
for i in range(200):
    time.sleep(0.01)
    # # 假设新的总步数为 10000
    # training_bar.total = 200
    # training_bar.refresh()
    training_bar.update(1)
    training_bar.write(str("test logs {}".format(i)))
    # if i == 100:
    #     training_bar.close()  # 手动关闭进度条
